package bosque.unc.gui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.text.NumberFormat;

import javax.swing.JSpinner;
import javax.swing.JSlider;
import javax.swing.JScrollBar;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.TitledBorder;
import javax.swing.JCheckBox;

import bosque.unc.Ajustes;
import bosque.unc.Consola;
import bosque.unc.ControladorUSB;
import bosque.unc.Cupula;
import bosque.unc.Espectrografo;
import bosque.unc.EspejoSecundario;
import bosque.unc.Inicializacion;
import bosque.unc.Interprete;
import bosque.unc.Lecturas;
import bosque.unc.Plataforma;
import bosque.unc.Telescopio;
import bosque.unc.enumerations.Accion;
import bosque.unc.enumerations.Direccion;
import bosque.unc.enumerations.Sensor;
import bosque.unc.exceptions.ManoplaException;

public class ScobaGui
{

	private JFrame frame;
	private Cupula cupula;
	private Espectrografo espectrografo;
	private Consola consola;
	private Lecturas lecturas;
	private Plataforma plataforma;
	private Telescopio telescopio;
	private EspejoSecundario espejoSecundario;
	private ControladorUSB controlador;
	private Interprete interprete;
	//private MostrarG mostrar;
	private Ajustes ajustes;
	private Inicializacion inicializacion;
	private JTextField textFieldEncAlfaCenGrad;
	private JTextField textFieldEncAlfaDecGrad;
	private JTextField textFieldEncAlfaDecMin;
	private JTextField textFieldEncAlfaDecSeg;
	private JTextField textFieldEncDeltaCenGrad;
	private JTextField textFieldEncDeltaDecGrad;
	private JTextField textFieldEncDeltaDecMin;
	private JTextField textFieldEncDeltaDecSeg;
	private JTextField textFieldCupula;
	private JCheckBox chkboxCupula;
	private JCheckBox chkboxEspecX;
	private JTextField textFieldEspecX;
	private JCheckBox chkboxEspecY;
	private JTextField textFieldEspecY;
	private JCheckBox chkboxEspecRed;
	private JTextField textFieldEspecRed;
	private JCheckBox chkboxTempExt;
	private JTextField textFieldTempExt;
	private JCheckBox chkboxTempEspejo;
	private JTextField textFieldTempEspejo;
	private JCheckBox chkboxPlatArab;
	private JTextField textFieldPlatARAB;
	private JCheckBox chkboxPlatAdaf;
	private JTextField textFieldPlatADAF;
	private JCheckBox chkboxFinesCarrera;
	private JTextField textFieldFinesCarrera;
	private JCheckBox chkboxFuncionOk;
	private JTextField textFieldFuncionamiento;
	private JCheckBox checkBoxTelCalado;
	private JCheckBox checkBoxTelReloj;
	private JCheckBox checkBoxTelOeste;
	private JCheckBox checkBoxTelEste;
	private JCheckBox checkBoxTelSur;
	private JCheckBox chckbxTelNorte;
	private JPanel panel_Cupula;
	private JCheckBox checkBoxCupDerecha;
	private JCheckBox chckbxCupIzquierda;
	private JCheckBox checkBoxCupVel;
	private JPanel panel_espejo;
	private JCheckBox checkBoxEspejAlejar;
	private JCheckBox checkBoxEspejAcercar;
	private JPanel panel_plataforma;
	private JCheckBox checkBoxPlatArriba;
	private JCheckBox checkBoxPlatAbajo;
	private JCheckBox chckbxPlatAdentro;
	private JCheckBox chckbxPlatAfuera;
	private JPanel panel_consola;
	private JCheckBox checkBoxConTablero;
	private JCheckBox checkBoxConPulsador;
	private JCheckBox checkBoxConInterfaz0;
	private JCheckBox chckbxInterfaz1;
	private JCheckBox checkBoxConReloj;
	private JCheckBox checkBoxTelConRampa;
	private JTextField textFieldCupRes;
	private JTextField textFieldEspecXRes;
	private JTextField textFieldEspecYRes;
	private JTextField textFieldEspecRedRes;
	private JTextField textFieldTempExtRes;
	private JTextField textFieldTempEspRes;
	private JTextField textFieldPlatARABRes;
	private JTextField textFieldPlatADAFRes;
	private JTextField textFieldfac5vDelPic;
	private JTextField textFieldFacTempAlim1;
	private JTextField textFieldFacTempAlim2;
	private JTextField textFieldFacCorrTempExt;
	private JTextField textFieldFacCorrTempEsp;
	private JTextField textFieldFacPlaAR0;
	private JTextField textFieldFacPlaAR1;
	private JTextField textFieldFacPlaAD0;
	private JTextField textFieldFacPlaAD1;
	private JTextField textFieldFacPlaRad0;
	private JLabel labelFacCup0;
	private JLabel labelFacCup1;
	private JLabel labelFacCorrCup;
	private JLabel labelFacXGanX;
	private JLabel labelfacEspGanY;
	private JTextField textFieldfacEspGanY;
	private JTextField textFieldFacEspGanX;
	private JTextField textFieldFacCorrCup;
	private JTextField textFieldFacCup1;
	private JTextField textFieldFacCup0;
	private JTextField textFieldFacCupOffset;
	private JLabel labelFacCupOffset;
	private JLabel labelFacCorrPlatRad;
	private JLabel labelFacCorrPlatAlt;
	private JLabel labelFacPlaRad1;
	private JTextField textFieldFacPlaRad1;
	private JTextField textFieldFacCorrPlatAlt;
	private JTextField textFieldFacCorrPlaRad;
	private JTextField textFieldFacCupGan;
	private JLabel labelFacCupGan;
	private JTextField textFieldDelayRampa;
	private JLabel labelDelayRampa;
	private JLabel labelMaxRampa;
	private JTextField textFieldMaxRampa;
	private JLabel labelMinRampa;
	private JLabel labelEspFacCorrFi;
	private JLabel labelEspFacCorrY;
	private JLabel labelEspFacCorrX;
	private JLabel labelFacEspGanFi;
	private JLabel labelEspOffsetFi;
	private JLabel labelfacEspOffsetY;
	private JLabel labelfacEspOffsetX;
	private JTextField textFieldfacEspOffsetX;
	private JTextField textFieldfacEspOffsetY;
	private JTextField textFieldfacEspOffsetFi;
	private JTextField textFieldFacEspGanFi;
	private JTextField textFieldEspFacCorrX;
	private JTextField textFieldEspFacCorrY;
	private JTextField textFieldEspFacCorrFi;
	private JTextField textFieldMinRampa;
	private JPanel panelEncoders;
	private JTextField textFieldGradAlfa;
	private JTextField textFieldMinAlfa;
	private JTextField textFieldSegAlfa;
	private JTextField textFieldGradDelta;
	private JTextField textFieldMinDelta;
	private JTextField textFieldSegDelta;
	private JCheckBox checkBoxObt;
	private JCheckBox checkBoxYmenos;
	private JCheckBox chckbxFiltro;
	private JCheckBox chckbxRedmenos;
	private JCheckBox chckbxXmas;
	private JCheckBox chckbxFiltro_1;
	private JCheckBox checkBoxXmenos;
	private JCheckBox checkBoxYmas;
	private JCheckBox checkBoxRanura;
	private JCheckBox chckbxLed;
	private JCheckBox chckbxComparar;
	private JCheckBox checkBoxCont;
	private JCheckBox chckbxEnterF;
	private JCheckBox chckbxRedmas;
	

	/**
	 * Launch the application.
	 */
	public static void main(String[] args)
	{
		EventQueue.invokeLater(new Runnable()
		{
			public void run()
			{
				try
				{
					System.out.println("Look and Fell: " + UIManager.getSystemLookAndFeelClassName());
					UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
				}
				catch (Exception ex)
				{
					System.out.println("Failed loading L&F: ");
					System.out.println(ex);
				}

				try
				{
					ScobaGui window = new ScobaGui();
					window.frame.setVisible(true);
				} catch (Exception e)
				{
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public ScobaGui()
	{
		this.cupula = new Cupula();
		this.telescopio = new Telescopio();
		this.controlador = new ControladorUSB();
		this.espejoSecundario = new EspejoSecundario();
		this.espectrografo = new Espectrografo();
		this.plataforma = new Plataforma();
		this.consola = new Consola();
		controlador.abrirDispositivoUSB(0x04d8, 0x0042);
		this.interprete = new Interprete(controlador,null);
		cupula.setInterprete(interprete);
		telescopio.setInterprete(interprete);
		plataforma.setInterprete(interprete);
		consola.setInterprete(interprete);
		espejoSecundario.setInterprete(interprete);
		espectrografo.setInterprete(interprete);
		this.lecturas = new Lecturas(interprete, telescopio, cupula, plataforma, espejoSecundario, espectrografo,null);	
		initialize();		
		//lecturas.leerEncoder(EncoderNombre.ALFA, 100);
		//lecturas.leerEncoder(EncoderNombre.DELTA, 100);
		//lecturas.leerSensores(100);
		this.ajustes = new Ajustes(lecturas);
		//this.inicializacion = new Inicializacion();
		//this.ajustes.crearArchivoDeConfiguracion("scoba2013.cfg");
		//this.mostrar = new MostrarG(this);
		//this.mostrar.start();
		
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize()
	{
		frame = new JFrame();
		frame.setBounds(100, 100, 1003, 716);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setBorder(new TitledBorder(null, "Sensores", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(26, 147, 268, 314);
		frame.getContentPane().add(panel);
		panel.setLayout(null);
		
		textFieldCupula = new JTextField();
		textFieldCupula.setEnabled(false);
		textFieldCupula.setEditable(false);
		textFieldCupula.setBounds(106, 22, 46, 20);
		panel.add(textFieldCupula);
		textFieldCupula.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldCupula.setColumns(10);
		
		chkboxCupula = new JCheckBox("Cupula:");
		chkboxCupula.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				if(chkboxCupula.isSelected())
				{
					textFieldCupula.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.CUPULA, true);
				}
				else
				{
					textFieldCupula.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.CUPULA, false);
				}
			}
		});
		chkboxCupula.setBounds(6, 21, 97, 23);
		panel.add(chkboxCupula);
		
		chkboxEspecX = new JCheckBox("Espec X:");
		chkboxEspecX.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxEspecX.isSelected())
				{
					textFieldEspecX.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_X, true);
				}
				else
				{
					textFieldEspecX.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_X, false);
				}
				
			}
		});
		chkboxEspecX.setBounds(6, 49, 97, 23);
		panel.add(chkboxEspecX);
		
		textFieldEspecX = new JTextField();
		textFieldEspecX.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEspecX.setEnabled(false);
		textFieldEspecX.setEditable(false);
		textFieldEspecX.setColumns(10);
		textFieldEspecX.setBounds(106, 50, 46, 20);
		panel.add(textFieldEspecX);
		
		chkboxEspecY = new JCheckBox("Espec Y:");
		chkboxEspecY.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxEspecY.isSelected())
				{
					textFieldEspecY.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_Y, true);
				}
				else
				{
					textFieldEspecY.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_Y, false);
				}
			}
		});
		chkboxEspecY.setBounds(6, 75, 97, 23);
		panel.add(chkboxEspecY);
		
		textFieldEspecY = new JTextField();
		textFieldEspecY.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEspecY.setEnabled(false);
		textFieldEspecY.setEditable(false);
		textFieldEspecY.setColumns(10);
		textFieldEspecY.setBounds(106, 76, 46, 20);
		panel.add(textFieldEspecY);
		
		chkboxEspecRed = new JCheckBox("Espec Red:");
		chkboxEspecRed.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxEspecRed.isSelected())
				{
					textFieldEspecRed.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_RED, true);
				}
				else
				{
					textFieldEspecRed.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.ESPEC_RED, false);
				}
			}
		});
		chkboxEspecRed.setBounds(6, 103, 97, 23);
		panel.add(chkboxEspecRed);
		
		textFieldEspecRed = new JTextField();
		textFieldEspecRed.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEspecRed.setEnabled(false);
		textFieldEspecRed.setEditable(false);
		textFieldEspecRed.setColumns(10);
		textFieldEspecRed.setBounds(106, 104, 46, 20);
		panel.add(textFieldEspecRed);
		
		chkboxTempExt = new JCheckBox("Temp Ext:");
		chkboxTempExt.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxTempExt.isSelected())
				{
					textFieldTempExt.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.TEMP_EXTERIOR, true);
				}
				else
				{
					textFieldTempExt.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.TEMP_EXTERIOR, false);
				}
			}
		});
		chkboxTempExt.setBounds(6, 129, 97, 23);
		panel.add(chkboxTempExt);
		
		textFieldTempExt = new JTextField();
		textFieldTempExt.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldTempExt.setEnabled(false);
		textFieldTempExt.setEditable(false);
		textFieldTempExt.setColumns(10);
		textFieldTempExt.setBounds(106, 130, 46, 20);
		panel.add(textFieldTempExt);
		
		chkboxTempEspejo = new JCheckBox("Temp Espejo:");
		chkboxTempEspejo.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxTempEspejo.isSelected())
				{
					textFieldTempEspejo.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.TEMP_ESPEJO, true);
				}
				else
				{
					textFieldTempEspejo.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.TEMP_ESPEJO, false);
				}
			}
		});
		chkboxTempEspejo.setBounds(6, 155, 97, 23);
		panel.add(chkboxTempEspejo);
		
		textFieldTempEspejo = new JTextField();
		textFieldTempEspejo.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldTempEspejo.setEnabled(false);
		textFieldTempEspejo.setEditable(false);
		textFieldTempEspejo.setColumns(10);
		textFieldTempEspejo.setBounds(106, 156, 46, 20);
		panel.add(textFieldTempEspejo);
		
		chkboxPlatArab = new JCheckBox("Plat AR/AB:");
		chkboxPlatArab.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxPlatArab.isSelected())
				{
					textFieldPlatARAB.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.PLATAF_AR_AB, true);
				}
				else
				{
					textFieldPlatARAB.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.PLATAF_AR_AB, false);
				}
			}
		});
		chkboxPlatArab.setBounds(6, 181, 97, 23);
		panel.add(chkboxPlatArab);
		
		textFieldPlatARAB = new JTextField();
		textFieldPlatARAB.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldPlatARAB.setEnabled(false);
		textFieldPlatARAB.setEditable(false);
		textFieldPlatARAB.setColumns(10);
		textFieldPlatARAB.setBounds(106, 182, 46, 20);
		panel.add(textFieldPlatARAB);
		
		chkboxPlatAdaf = new JCheckBox("Plat AD/AF:");
		chkboxPlatAdaf.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxPlatAdaf.isSelected())
				{
					textFieldPlatADAF.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.PLATAF_AD_AF, true);
				}
				else
				{
					textFieldPlatADAF.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.PLATAF_AD_AF, false);
				}
				
			}
		});
		chkboxPlatAdaf.setBounds(6, 205, 97, 23);
		panel.add(chkboxPlatAdaf);
		
		textFieldPlatADAF = new JTextField();
		textFieldPlatADAF.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldPlatADAF.setEnabled(false);
		textFieldPlatADAF.setEditable(false);
		textFieldPlatADAF.setColumns(10);
		textFieldPlatADAF.setBounds(106, 206, 46, 20);
		panel.add(textFieldPlatADAF);
		
		chkboxFinesCarrera = new JCheckBox("Fines Carrera:");
		chkboxFinesCarrera.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxFinesCarrera.isSelected())
				{
					textFieldFinesCarrera.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.FINES_CARRERA, true);
				}
				else
				{
					textFieldFinesCarrera.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.FINES_CARRERA, false);
				}
			}
		});
		chkboxFinesCarrera.setBounds(6, 231, 97, 23);
		panel.add(chkboxFinesCarrera);
		
		textFieldFinesCarrera = new JTextField();
		textFieldFinesCarrera.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldFinesCarrera.setEnabled(false);
		textFieldFinesCarrera.setEditable(false);
		textFieldFinesCarrera.setColumns(10);
		textFieldFinesCarrera.setBounds(106, 232, 46, 20);
		panel.add(textFieldFinesCarrera);
		
		chkboxFuncionOk = new JCheckBox("Check PIC:");
		chkboxFuncionOk.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chkboxFuncionOk.isSelected())
				{
					textFieldFuncionamiento.setEnabled(true);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.FUNCIONAMIENTO, true);
				}
				else
				{
					textFieldFuncionamiento.setEnabled(false);
					//lecturas.getHiloLecturaSensor().activarSensor(Sensor.FUNCIONAMIENTO, false);
				}
			
			}
		});
		chkboxFuncionOk.setBounds(6, 257, 97, 23);
		panel.add(chkboxFuncionOk);
		
		textFieldFuncionamiento = new JTextField();
		textFieldFuncionamiento.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldFuncionamiento.setEnabled(false);
		textFieldFuncionamiento.setEditable(false);
		textFieldFuncionamiento.setColumns(10);
		textFieldFuncionamiento.setBounds(106, 258, 46, 20);
		panel.add(textFieldFuncionamiento);
		
		textFieldCupRes = new JTextField();
		textFieldCupRes.setBounds(162, 22, 86, 20);
		panel.add(textFieldCupRes);
		textFieldCupRes.setColumns(10);
		
		textFieldEspecXRes = new JTextField();
		textFieldEspecXRes.setColumns(10);
		textFieldEspecXRes.setBounds(162, 50, 86, 20);
		panel.add(textFieldEspecXRes);
		
		textFieldEspecYRes = new JTextField();
		textFieldEspecYRes.setColumns(10);
		textFieldEspecYRes.setBounds(162, 76, 86, 20);
		panel.add(textFieldEspecYRes);
		
		textFieldEspecRedRes = new JTextField();
		textFieldEspecRedRes.setColumns(10);
		textFieldEspecRedRes.setBounds(162, 104, 86, 20);
		panel.add(textFieldEspecRedRes);
		
		textFieldTempExtRes = new JTextField();
		textFieldTempExtRes.setColumns(10);
		textFieldTempExtRes.setBounds(162, 130, 86, 20);
		panel.add(textFieldTempExtRes);
		
		textFieldTempEspRes = new JTextField();
		textFieldTempEspRes.setColumns(10);
		textFieldTempEspRes.setBounds(162, 156, 86, 20);
		panel.add(textFieldTempEspRes);
		
		textFieldPlatARABRes = new JTextField();
		textFieldPlatARABRes.setColumns(10);
		textFieldPlatARABRes.setBounds(162, 182, 86, 20);
		panel.add(textFieldPlatARABRes);
		
		textFieldPlatADAFRes = new JTextField();
		textFieldPlatADAFRes.setColumns(10);
		textFieldPlatADAFRes.setBounds(162, 206, 86, 20);
		panel.add(textFieldPlatADAFRes);
		
		JPanel panel_tel = new JPanel();
		panel_tel.setBorder(new TitledBorder(null, "Telescopio", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_tel.setBounds(22, 472, 181, 136);
		frame.getContentPane().add(panel_tel);
		panel_tel.setLayout(null);
		
		chckbxTelNorte = new JCheckBox("NORTE");
		chckbxTelNorte.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				if(chckbxTelNorte.isSelected())
				{
					try {
						telescopio.mover(Direccion.NORTE);
					} catch (ManoplaException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
				else
				{
					try {
						telescopio.mover(Direccion.PARADO);
					} catch (ManoplaException e) {
						// TODO Auto-generated catch block
						e.printStackTrace();
					}
				}
			}
		});
		chckbxTelNorte.setBounds(6, 17, 70, 23);
		panel_tel.add(chckbxTelNorte);
		
		checkBoxTelSur = new JCheckBox("SUR");
		checkBoxTelSur.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelSur.isSelected())
				{
					try {
						telescopio.mover(Direccion.SUR);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
				else
				{
					try {
						telescopio.mover(Direccion.PARADO);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
			}
		});
		checkBoxTelSur.setBounds(78, 17, 70, 23);
		panel_tel.add(checkBoxTelSur);
		
		checkBoxTelEste = new JCheckBox("ESTE");
		checkBoxTelEste.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelEste.isSelected())
				{
					try {
						telescopio.mover(Direccion.ESTE);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
				else
				{
					try {
						telescopio.mover(Direccion.PARADO);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
			}
		});
		checkBoxTelEste.setBounds(6, 45, 70, 23);
		panel_tel.add(checkBoxTelEste);
		
		checkBoxTelOeste = new JCheckBox("OESTE");
		checkBoxTelOeste.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelOeste.isSelected())
				{
					try {
						telescopio.mover(Direccion.OESTE);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
				else
				{
					try {
						telescopio.mover(Direccion.PARADO);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
			}
		});
		checkBoxTelOeste.setBounds(78, 45, 70, 23);
		panel_tel.add(checkBoxTelOeste);
		
		checkBoxTelCalado = new JCheckBox("Calado");
		checkBoxTelCalado.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelCalado.isSelected())
				{
					try {
						telescopio.activarMovCalado(true);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
				else
				{
					try {
						telescopio.activarMovCalado(false);
					} catch (ManoplaException e1) {
						// TODO Auto-generated catch block
						e1.printStackTrace();
					}
				}
			}
		});
		checkBoxTelCalado.setBounds(6, 71, 70, 23);
		panel_tel.add(checkBoxTelCalado);
		
		checkBoxTelReloj = new JCheckBox("Relojeria");
		checkBoxTelReloj.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelReloj.isSelected())
				{
					telescopio.activarRelojeria(true);
				}
				else
				{
					telescopio.activarRelojeria(false);
				}
			
				
			}
		});
		checkBoxTelReloj.setBounds(78, 71, 70, 23);
		panel_tel.add(checkBoxTelReloj);
		
		checkBoxTelConRampa = new JCheckBox("Conm Rampa");
		checkBoxTelConRampa.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxTelConRampa.isSelected())
				{
					telescopio.activarConmutRampa(true);
				}
				else
				{
					telescopio.activarConmutRampa(false);
				}
			}
		});
		checkBoxTelConRampa.setBounds(6, 97, 107, 23);
		panel_tel.add(checkBoxTelConRampa);
		
		panel_Cupula = new JPanel();
		panel_Cupula.setBorder(new TitledBorder(null, "Cupula", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_Cupula.setBounds(399, 472, 181, 80);
		frame.getContentPane().add(panel_Cupula);
		panel_Cupula.setLayout(null);
		
		checkBoxCupDerecha = new JCheckBox("DERECHA");
		checkBoxCupDerecha.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxCupDerecha.isSelected())
				{
					cupula.mover(Direccion.DERECHA);
				}
				else
				{
					cupula.mover(Direccion.PARADO);
				}
			}
		});
		checkBoxCupDerecha.setBounds(6, 20, 73, 23);
		panel_Cupula.add(checkBoxCupDerecha);
		
		chckbxCupIzquierda = new JCheckBox("IZQUIERDA");
		chckbxCupIzquierda.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (chckbxCupIzquierda.isSelected())
				{
					cupula.mover(Direccion.IZQUIERDA);
				}
				else
				{
					cupula.mover(Direccion.PARADO);
				}
				
			}
		});
		chckbxCupIzquierda.setBounds(81, 20, 94, 23);
		panel_Cupula.add(chckbxCupIzquierda);
		
		checkBoxCupVel = new JCheckBox("Vel Lenta");
		checkBoxCupVel.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxCupVel.isSelected())
				{
					cupula.activarVelLenta(true);
				}
				else
				{
					cupula.activarVelLenta(false);
				}
			}
		});
		checkBoxCupVel.setBounds(6, 49, 79, 23);
		panel_Cupula.add(checkBoxCupVel);
		
		panel_espejo = new JPanel();
		panel_espejo.setBorder(new TitledBorder(null, "Esspejo Secundario", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_espejo.setBounds(399, 555, 181, 80);
		frame.getContentPane().add(panel_espejo);
		panel_espejo.setLayout(null);
		
		checkBoxEspejAlejar = new JCheckBox("Alejar");
		checkBoxEspejAlejar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxEspejAlejar.isSelected())
				{
					espejoSecundario.mover(Direccion.AFUERA);
				}
				else
				{
					espejoSecundario.mover(Direccion.PARADO);
				}
					
			}
		});
		checkBoxEspejAlejar.setBounds(6, 20, 73, 23);
		panel_espejo.add(checkBoxEspejAlejar);
		
		checkBoxEspejAcercar = new JCheckBox("Acercar");
		checkBoxEspejAcercar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxEspejAcercar.isSelected())
				{
					espejoSecundario.mover(Direccion.ADENTRO);
				}
				else
				{
					espejoSecundario.mover(Direccion.PARADO);
				}
			}
		});
		checkBoxEspejAcercar.setBounds(81, 20, 73, 23);
		panel_espejo.add(checkBoxEspejAcercar);
		
		panel_plataforma = new JPanel();
		panel_plataforma.setLayout(null);
		panel_plataforma.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Plataforma", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_plataforma.setBounds(208, 573, 181, 80);
		frame.getContentPane().add(panel_plataforma);
		
		checkBoxPlatArriba = new JCheckBox("ARRIBA");
		checkBoxPlatArriba.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxPlatArriba.isSelected())
				{
					plataforma.mover(Direccion.ARRIBA);
				}
				else
				{
					plataforma.mover(Direccion.PARADO);
				}
			}
		});
		checkBoxPlatArriba.setBounds(6, 17, 70, 23);
		panel_plataforma.add(checkBoxPlatArriba);
		
		checkBoxPlatAbajo = new JCheckBox("ABAJO");
		checkBoxPlatAbajo.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (checkBoxPlatAbajo.isSelected())
				{
					plataforma.mover(Direccion.ABAJO);
				}
				else
				{
					plataforma.mover(Direccion.PARADO);
				}
			}
		});
		checkBoxPlatAbajo.setBounds(91, 17, 70, 23);
		panel_plataforma.add(checkBoxPlatAbajo);
		
		chckbxPlatAdentro = new JCheckBox("ADENTRO");
		chckbxPlatAdentro.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (chckbxPlatAdentro.isSelected())
				{
					plataforma.mover(Direccion.ADENTRO);
				}
				else
				{
					plataforma.mover(Direccion.PARADO);
				}
			}
		});
		chckbxPlatAdentro.setBounds(6, 45, 80, 23);
		panel_plataforma.add(chckbxPlatAdentro);
		
		chckbxPlatAfuera = new JCheckBox("AFUERA");
		chckbxPlatAfuera.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (chckbxPlatAfuera.isSelected())
				{
					plataforma.mover(Direccion.AFUERA);
				}
				else
				{
					plataforma.mover(Direccion.PARADO);
				}
			}
		});
		chckbxPlatAfuera.setBounds(91, 45, 70, 23);
		panel_plataforma.add(chckbxPlatAfuera);
		
		panel_consola = new JPanel();
		panel_consola.setBorder(new TitledBorder(null, "Consola", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_consola.setBounds(208, 472, 181, 99);
		frame.getContentPane().add(panel_consola);
		panel_consola.setLayout(null);
		
		checkBoxConTablero = new JCheckBox("Tablero");
		checkBoxConTablero.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxConTablero.isSelected())
				{
					consola.activarTablero(true);
				}
				else
				{
					consola.activarTablero(false);
				}
			}
		});
		checkBoxConTablero.setBounds(6, 18, 70, 23);
		panel_consola.add(checkBoxConTablero);
		
		checkBoxConPulsador = new JCheckBox("Pulsador");
		checkBoxConPulsador.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxConPulsador.isSelected())
				{
					consola.activarPulsador(true);
				}
				else
				{
					consola.activarPulsador(false);
				}
			}
		});
		checkBoxConPulsador.setBounds(6, 44, 70, 23);
		panel_consola.add(checkBoxConPulsador);
		
		checkBoxConInterfaz0 = new JCheckBox("Interfaz0");
		checkBoxConInterfaz0.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxConInterfaz0.isSelected())
				{
					consola.activarInterfaz0(true);
				}
				else
				{
					consola.activarInterfaz0(false);
				}
			}
		});
		checkBoxConInterfaz0.setBounds(90, 18, 70, 23);
		panel_consola.add(checkBoxConInterfaz0);
		
		chckbxInterfaz1 = new JCheckBox("Interfaz1");
		chckbxInterfaz1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxInterfaz1.isSelected())
				{
					consola.activarInterfaz1(true);
				}
				else
				{
					consola.activarInterfaz1(false);
				}
			}
		});
		chckbxInterfaz1.setBounds(90, 44, 70, 23);
		panel_consola.add(chckbxInterfaz1);
		
		checkBoxConReloj = new JCheckBox("Relojeria");
		checkBoxConReloj.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxConReloj.isSelected())
				{
					consola.activarRelojeria(true);
				}
				else
				{
					consola.activarRelojeria(false);
				}
			}
		});
		checkBoxConReloj.setBounds(6, 70, 70, 23);
		panel_consola.add(checkBoxConReloj);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new TitledBorder(null, "Factores", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_1.setBounds(303, 147, 566, 314);
		frame.getContentPane().add(panel_1);
		panel_1.setLayout(null);
		
		JLabel lblFacvdelpic = new JLabel("fac5vDelPic:");
		lblFacvdelpic.setHorizontalAlignment(SwingConstants.RIGHT);
		lblFacvdelpic.setBounds(10, 25, 89, 14);
		panel_1.add(lblFacvdelpic);
		
		textFieldfac5vDelPic = new JTextField();
		textFieldfac5vDelPic.setBounds(109, 22, 60, 20);
		panel_1.add(textFieldfac5vDelPic);
		textFieldfac5vDelPic.setColumns(10);
		
		JLabel labelFacTempAlim1 = new JLabel("facTempAlim1");
		labelFacTempAlim1.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacTempAlim1.setBounds(10, 53, 89, 14);
		panel_1.add(labelFacTempAlim1);
		
		textFieldFacTempAlim1 = new JTextField();
		textFieldFacTempAlim1.setColumns(10);
		textFieldFacTempAlim1.setBounds(109, 50, 60, 20);
		panel_1.add(textFieldFacTempAlim1);
		
		JLabel labelFacTempAlim2 = new JLabel("facTempAlim2");
		labelFacTempAlim2.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacTempAlim2.setBounds(10, 81, 89, 14);
		panel_1.add(labelFacTempAlim2);
		
		textFieldFacTempAlim2 = new JTextField();
		textFieldFacTempAlim2.setColumns(10);
		textFieldFacTempAlim2.setBounds(109, 78, 60, 20);
		panel_1.add(textFieldFacTempAlim2);
		
		JLabel labelFacCorrTempExt = new JLabel("facCorrTempExt");
		labelFacCorrTempExt.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCorrTempExt.setBounds(10, 109, 89, 14);
		panel_1.add(labelFacCorrTempExt);
		
		textFieldFacCorrTempExt = new JTextField();
		textFieldFacCorrTempExt.setColumns(10);
		textFieldFacCorrTempExt.setBounds(109, 106, 60, 20);
		panel_1.add(textFieldFacCorrTempExt);
		
		JLabel labelFacCorrTempEsp = new JLabel("facCorrTempEsp");
		labelFacCorrTempEsp.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCorrTempEsp.setBounds(10, 137, 89, 14);
		panel_1.add(labelFacCorrTempEsp);
		
		textFieldFacCorrTempEsp = new JTextField();
		textFieldFacCorrTempEsp.setColumns(10);
		textFieldFacCorrTempEsp.setBounds(109, 134, 60, 20);
		panel_1.add(textFieldFacCorrTempEsp);
		
		JLabel labelFacPlaAR0 = new JLabel("facPlaAR0");
		labelFacPlaAR0.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaAR0.setBounds(10, 165, 89, 14);
		panel_1.add(labelFacPlaAR0);
		
		textFieldFacPlaAR0 = new JTextField();
		textFieldFacPlaAR0.setColumns(10);
		textFieldFacPlaAR0.setBounds(109, 162, 60, 20);
		panel_1.add(textFieldFacPlaAR0);
		
		JLabel labelFacPlaAR1 = new JLabel("facPlaAR1");
		labelFacPlaAR1.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaAR1.setBounds(10, 193, 89, 14);
		panel_1.add(labelFacPlaAR1);
		
		textFieldFacPlaAR1 = new JTextField();
		textFieldFacPlaAR1.setColumns(10);
		textFieldFacPlaAR1.setBounds(109, 190, 60, 20);
		panel_1.add(textFieldFacPlaAR1);
		
		JLabel labelFacPlaAD0 = new JLabel("facPlaAD0");
		labelFacPlaAD0.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaAD0.setBounds(10, 221, 89, 14);
		panel_1.add(labelFacPlaAD0);
		
		textFieldFacPlaAD0 = new JTextField();
		textFieldFacPlaAD0.setColumns(10);
		textFieldFacPlaAD0.setBounds(109, 218, 60, 20);
		panel_1.add(textFieldFacPlaAD0);
		
		JLabel labelFacPlaAD1 = new JLabel("facPlaAD1");
		labelFacPlaAD1.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaAD1.setBounds(10, 249, 89, 14);
		panel_1.add(labelFacPlaAD1);
		
		textFieldFacPlaAD1 = new JTextField();
		textFieldFacPlaAD1.setColumns(10);
		textFieldFacPlaAD1.setBounds(109, 246, 60, 20);
		panel_1.add(textFieldFacPlaAD1);
		
		JLabel labelFacPlaRad0 = new JLabel("facPlaRad0");
		labelFacPlaRad0.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaRad0.setBounds(10, 277, 89, 14);
		panel_1.add(labelFacPlaRad0);
		
		textFieldFacPlaRad0 = new JTextField();
		textFieldFacPlaRad0.setColumns(10);
		textFieldFacPlaRad0.setBounds(109, 274, 60, 20);
		panel_1.add(textFieldFacPlaRad0);
		
		labelFacCup0 = new JLabel("facCup0");
		labelFacCup0.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCup0.setBounds(178, 165, 89, 14);
		panel_1.add(labelFacCup0);
		
		labelFacCup1 = new JLabel("facCup1");
		labelFacCup1.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCup1.setBounds(178, 193, 89, 14);
		panel_1.add(labelFacCup1);
		
		labelFacCorrCup = new JLabel("facCorrCup");
		labelFacCorrCup.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCorrCup.setBounds(178, 221, 89, 14);
		panel_1.add(labelFacCorrCup);
		
		labelFacXGanX = new JLabel("facEspGanX");
		labelFacXGanX.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacXGanX.setBounds(178, 249, 89, 14);
		panel_1.add(labelFacXGanX);
		
		labelfacEspGanY = new JLabel("facEspGanY");
		labelfacEspGanY.setHorizontalAlignment(SwingConstants.RIGHT);
		labelfacEspGanY.setBounds(178, 277, 89, 14);
		panel_1.add(labelfacEspGanY);
		
		textFieldfacEspGanY = new JTextField();
		textFieldfacEspGanY.setColumns(10);
		textFieldfacEspGanY.setBounds(277, 274, 60, 20);
		panel_1.add(textFieldfacEspGanY);
		
		textFieldFacEspGanX = new JTextField();
		textFieldFacEspGanX.setColumns(10);
		textFieldFacEspGanX.setBounds(277, 246, 60, 20);
		panel_1.add(textFieldFacEspGanX);
		
		textFieldFacCorrCup = new JTextField();
		textFieldFacCorrCup.setColumns(10);
		textFieldFacCorrCup.setBounds(277, 218, 60, 20);
		panel_1.add(textFieldFacCorrCup);
		
		textFieldFacCup1 = new JTextField();
		textFieldFacCup1.setColumns(10);
		textFieldFacCup1.setBounds(277, 190, 60, 20);
		panel_1.add(textFieldFacCup1);
		
		textFieldFacCup0 = new JTextField();
		textFieldFacCup0.setColumns(10);
		textFieldFacCup0.setBounds(277, 162, 60, 20);
		panel_1.add(textFieldFacCup0);
		
		textFieldFacCupOffset = new JTextField();
		textFieldFacCupOffset.setColumns(10);
		textFieldFacCupOffset.setBounds(277, 134, 60, 20);
		panel_1.add(textFieldFacCupOffset);
		
		labelFacCupOffset = new JLabel("facCupOffset");
		labelFacCupOffset.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCupOffset.setBounds(178, 137, 89, 14);
		panel_1.add(labelFacCupOffset);
		
		labelFacCorrPlatRad = new JLabel("facCorrPlaRad");
		labelFacCorrPlatRad.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCorrPlatRad.setBounds(178, 81, 89, 14);
		panel_1.add(labelFacCorrPlatRad);
		
		labelFacCorrPlatAlt = new JLabel("facCorrPlaAlt");
		labelFacCorrPlatAlt.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCorrPlatAlt.setBounds(178, 53, 89, 14);
		panel_1.add(labelFacCorrPlatAlt);
		
		labelFacPlaRad1 = new JLabel("facPlaRad1");
		labelFacPlaRad1.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacPlaRad1.setBounds(178, 25, 89, 14);
		panel_1.add(labelFacPlaRad1);
		
		textFieldFacPlaRad1 = new JTextField();
		textFieldFacPlaRad1.setColumns(10);
		textFieldFacPlaRad1.setBounds(277, 22, 60, 20);
		panel_1.add(textFieldFacPlaRad1);
		
		textFieldFacCorrPlatAlt = new JTextField();
		textFieldFacCorrPlatAlt.setColumns(10);
		textFieldFacCorrPlatAlt.setBounds(277, 50, 60, 20);
		panel_1.add(textFieldFacCorrPlatAlt);
		
		textFieldFacCorrPlaRad = new JTextField();
		textFieldFacCorrPlaRad.setColumns(10);
		textFieldFacCorrPlaRad.setBounds(277, 78, 60, 20);
		panel_1.add(textFieldFacCorrPlaRad);
		
		textFieldFacCupGan = new JTextField();
		textFieldFacCupGan.setColumns(10);
		textFieldFacCupGan.setBounds(277, 106, 60, 20);
		panel_1.add(textFieldFacCupGan);
		
		labelFacCupGan = new JLabel("facCupGan");
		labelFacCupGan.setHorizontalAlignment(SwingConstants.RIGHT);
		labelFacCupGan.setBounds(178, 109, 89, 14);
		panel_1.add(labelFacCupGan);
		
		textFieldDelayRampa = new JTextField();
		textFieldDelayRampa.setColumns(10);
		textFieldDelayRampa.setBounds(457, 274, 60, 20);
		panel_1.add(textFieldDelayRampa);
		
		labelDelayRampa = new JLabel("delayRampa");
		labelDelayRampa.setHorizontalAlignment(SwingConstants.RIGHT);
		labelDelayRampa.setBounds(358, 277, 89, 14);
		panel_1.add(labelDelayRampa);
		
		labelMaxRampa = new JLabel("MaxRampa");
		labelMaxRampa.setHorizontalAlignment(SwingConstants.RIGHT);
		labelMaxRampa.setBounds(358, 249, 89, 14);
		panel_1.add(labelMaxRampa);
		
		textFieldMaxRampa = new JTextField();
		textFieldMaxRampa.setColumns(10);
		textFieldMaxRampa.setBounds(457, 246, 60, 20);
		panel_1.add(textFieldMaxRampa);
		
		textFieldMinRampa = new JTextField();
		textFieldMinRampa.setColumns(10);
		textFieldMinRampa.setBounds(457, 218, 60, 20);
		panel_1.add(textFieldMinRampa);
		
		labelMinRampa = new JLabel("MinRampa");
		labelMinRampa.setHorizontalAlignment(SwingConstants.RIGHT);
		labelMinRampa.setBounds(358, 221, 89, 14);
		panel_1.add(labelMinRampa);
		
		labelEspFacCorrFi = new JLabel("EspFacCorrFi");
		labelEspFacCorrFi.setHorizontalAlignment(SwingConstants.RIGHT);
		labelEspFacCorrFi.setBounds(358, 193, 89, 14);
		panel_1.add(labelEspFacCorrFi);
		
		labelEspFacCorrY = new JLabel("EspFacCorrY");
		labelEspFacCorrY.setHorizontalAlignment(SwingConstants.RIGHT);
		labelEspFacCorrY.setBounds(358, 165, 89, 14);
		panel_1.add(labelEspFacCorrY);
		
		labelEspFacCorrX = new JLabel("EspFacCorrX");
		labelEspFacCorrX.setHorizontalAlignment(SwingConstants.RIGHT);
		labelEspFacCorrX.setBounds(358, 137, 89, 14);
		panel_1.add(labelEspFacCorrX);
		
		labelEspOffsetFi = new JLabel("facEspOffsetFi");
		labelEspOffsetFi.setHorizontalAlignment(SwingConstants.RIGHT);
		labelEspOffsetFi.setBounds(358, 106, 89, 14);
		panel_1.add(labelEspOffsetFi);
		
		labelfacEspOffsetY = new JLabel("facEspOffsetY");
		labelfacEspOffsetY.setHorizontalAlignment(SwingConstants.RIGHT);
		labelfacEspOffsetY.setBounds(358, 78, 89, 14);
		panel_1.add(labelfacEspOffsetY);
		
		labelfacEspOffsetX = new JLabel("facEspOffsetX");
		labelfacEspOffsetX.setHorizontalAlignment(SwingConstants.RIGHT);
		labelfacEspOffsetX.setBounds(358, 50, 89, 14);
		panel_1.add(labelfacEspOffsetX);
		
		textFieldfacEspOffsetX = new JTextField();
		textFieldfacEspOffsetX.setColumns(10);
		textFieldfacEspOffsetX.setBounds(457, 47, 60, 20);
		panel_1.add(textFieldfacEspOffsetX);
		
		textFieldfacEspOffsetY = new JTextField();
		textFieldfacEspOffsetY.setColumns(10);
		textFieldfacEspOffsetY.setBounds(457, 75, 60, 20);
		panel_1.add(textFieldfacEspOffsetY);
		
		textFieldfacEspOffsetFi = new JTextField();
		textFieldfacEspOffsetFi.setColumns(10);
		textFieldfacEspOffsetFi.setBounds(457, 103, 60, 20);
		panel_1.add(textFieldfacEspOffsetFi);
		
		textFieldEspFacCorrX = new JTextField();
		textFieldEspFacCorrX.setColumns(10);
		textFieldEspFacCorrX.setBounds(457, 134, 60, 20);
		panel_1.add(textFieldEspFacCorrX);
		
		textFieldEspFacCorrY = new JTextField();
		textFieldEspFacCorrY.setColumns(10);
		textFieldEspFacCorrY.setBounds(457, 162, 60, 20);
		panel_1.add(textFieldEspFacCorrY);
		
		textFieldEspFacCorrFi = new JTextField();
		textFieldEspFacCorrFi.setColumns(10);
		textFieldEspFacCorrFi.setBounds(457, 190, 60, 20);
		panel_1.add(textFieldEspFacCorrFi);
		
		labelFacEspGanFi = new JLabel("facEspGanFi");
		labelFacEspGanFi.setBounds(358, 22, 89, 14);
		panel_1.add(labelFacEspGanFi);
		labelFacEspGanFi.setHorizontalAlignment(SwingConstants.RIGHT);
		
		textFieldFacEspGanFi = new JTextField();
		textFieldFacEspGanFi.setBounds(457, 19, 60, 20);
		panel_1.add(textFieldFacEspGanFi);
		textFieldFacEspGanFi.setColumns(10);
		
		panelEncoders = new JPanel();
		panelEncoders.setBorder(new TitledBorder(null, "Encoders", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panelEncoders.setBounds(26, 11, 843, 136);
		frame.getContentPane().add(panelEncoders);
		panelEncoders.setLayout(null);
		
		JLabel lblEncoderDelta = new JLabel("Encoder Delta:");
		lblEncoderDelta.setBounds(10, 61, 89, 14);
		panelEncoders.add(lblEncoderDelta);
		
		JLabel lblEncoderAlfa = new JLabel("Encoder Alfa:");
		lblEncoderAlfa.setBounds(10, 30, 89, 14);
		panelEncoders.add(lblEncoderAlfa);
		
		textFieldEncAlfaCenGrad = new JTextField();
		textFieldEncAlfaCenGrad.setBounds(112, 27, 30, 20);
		panelEncoders.add(textFieldEncAlfaCenGrad);
		textFieldEncAlfaCenGrad.setEditable(false);
		textFieldEncAlfaCenGrad.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncAlfaCenGrad.setColumns(10);
		
		textFieldEncAlfaDecGrad = new JTextField();
		textFieldEncAlfaDecGrad.setEditable(false);
		textFieldEncAlfaDecGrad.setBounds(152, 27, 30, 20);
		panelEncoders.add(textFieldEncAlfaDecGrad);
		textFieldEncAlfaDecGrad.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncAlfaDecGrad.setColumns(10);
		
		textFieldEncAlfaDecMin = new JTextField();
		textFieldEncAlfaDecMin.setBounds(192, 27, 30, 20);
		panelEncoders.add(textFieldEncAlfaDecMin);
		textFieldEncAlfaDecMin.setEditable(false);
		textFieldEncAlfaDecMin.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncAlfaDecMin.setColumns(10);
		
		textFieldEncAlfaDecSeg = new JTextField();
		textFieldEncAlfaDecSeg.setBounds(232, 27, 30, 20);
		panelEncoders.add(textFieldEncAlfaDecSeg);
		textFieldEncAlfaDecSeg.setEditable(false);
		textFieldEncAlfaDecSeg.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncAlfaDecSeg.setColumns(10);
		
		textFieldEncDeltaDecSeg = new JTextField();
		textFieldEncDeltaDecSeg.setBounds(232, 58, 30, 20);
		panelEncoders.add(textFieldEncDeltaDecSeg);
		textFieldEncDeltaDecSeg.setEditable(false);
		textFieldEncDeltaDecSeg.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncDeltaDecSeg.setColumns(10);
		
		textFieldEncDeltaDecMin = new JTextField();
		textFieldEncDeltaDecMin.setBounds(192, 58, 30, 20);
		panelEncoders.add(textFieldEncDeltaDecMin);
		textFieldEncDeltaDecMin.setEditable(false);
		textFieldEncDeltaDecMin.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncDeltaDecMin.setColumns(10);
		
		textFieldEncDeltaDecGrad = new JTextField();
		textFieldEncDeltaDecGrad.setBounds(152, 58, 30, 20);
		panelEncoders.add(textFieldEncDeltaDecGrad);
		textFieldEncDeltaDecGrad.setEditable(false);
		textFieldEncDeltaDecGrad.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncDeltaDecGrad.setColumns(10);
		
		textFieldEncDeltaCenGrad = new JTextField();
		textFieldEncDeltaCenGrad.setBounds(112, 58, 30, 20);
		panelEncoders.add(textFieldEncDeltaCenGrad);
		textFieldEncDeltaCenGrad.setEditable(false);
		textFieldEncDeltaCenGrad.setHorizontalAlignment(SwingConstants.RIGHT);
		textFieldEncDeltaCenGrad.setColumns(10);
		
		textFieldGradAlfa = new JTextField();
		textFieldGradAlfa.setEditable(false);
		textFieldGradAlfa.setBounds(285, 27, 44, 20);
		panelEncoders.add(textFieldGradAlfa);
		textFieldGradAlfa.setColumns(10);
		
		textFieldMinAlfa = new JTextField();
		textFieldMinAlfa.setEditable(false);
		textFieldMinAlfa.setColumns(10);
		textFieldMinAlfa.setBounds(339, 27, 44, 20);
		panelEncoders.add(textFieldMinAlfa);
		
		textFieldSegAlfa = new JTextField();
		textFieldSegAlfa.setEditable(false);
		textFieldSegAlfa.setColumns(10);
		textFieldSegAlfa.setBounds(393, 27, 44, 20);
		panelEncoders.add(textFieldSegAlfa);
		
		textFieldGradDelta = new JTextField();
		textFieldGradDelta.setEditable(false);
		textFieldGradDelta.setColumns(10);
		textFieldGradDelta.setBounds(285, 58, 44, 20);
		panelEncoders.add(textFieldGradDelta);
		
		textFieldMinDelta = new JTextField();
		textFieldMinDelta.setEditable(false);
		textFieldMinDelta.setColumns(10);
		textFieldMinDelta.setBounds(339, 58, 44, 20);
		panelEncoders.add(textFieldMinDelta);
		
		textFieldSegDelta = new JTextField();
		textFieldSegDelta.setEditable(false);
		textFieldSegDelta.setColumns(10);
		textFieldSegDelta.setBounds(393, 58, 44, 20);
		panelEncoders.add(textFieldSegDelta);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBorder(new TitledBorder(null, "Espectrografo", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_2.setBounds(593, 480, 276, 155);
		frame.getContentPane().add(panel_2);
		panel_2.setLayout(null);
		
		checkBoxYmas = new JCheckBox("Y+");
		checkBoxYmas.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				if(checkBoxYmas.isSelected())
					espectrografo.moverCamaraCCD(Direccion.ARRIBA);
				else
					espectrografo.moverCamaraCCD(Direccion.PARADO);

			}
		});
		checkBoxYmas.setBounds(6, 18, 59, 23);
		panel_2.add(checkBoxYmas);
		
		checkBoxYmenos = new JCheckBox("Y-");
		checkBoxYmenos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxYmenos.isSelected())
					espectrografo.moverCamaraCCD(Direccion.ABAJO);
				else
					espectrografo.moverCamaraCCD(Direccion.PARADO);
			}
		});
		checkBoxYmenos.setBounds(6, 44, 59, 23);
		panel_2.add(checkBoxYmenos);
		
		chckbxXmas = new JCheckBox("X+");
		chckbxXmas.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxXmas.isSelected())
					espectrografo.moverCamaraCCD(Direccion.DERECHA);
				else
					espectrografo.moverCamaraCCD(Direccion.PARADO);
			}
		});
		chckbxXmas.setBounds(6, 70, 59, 23);
		panel_2.add(chckbxXmas);
		
		checkBoxXmenos = new JCheckBox("X-");
		checkBoxXmenos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxXmenos.isSelected())
					espectrografo.moverCamaraCCD(Direccion.IZQUIERDA);
				else
					espectrografo.moverCamaraCCD(Direccion.PARADO);
			}
		});
		checkBoxXmenos.setBounds(6, 96, 59, 23);
		panel_2.add(checkBoxXmenos);
		
		checkBoxRanura = new JCheckBox("Ranura");
		checkBoxRanura.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxRanura.isSelected())
					espectrografo.activarRanura(true);
				else
					espectrografo.activarRanura(false);
			}
		});
		checkBoxRanura.setBounds(85, 18, 73, 23);
		panel_2.add(checkBoxRanura);
		
		checkBoxObt = new JCheckBox("Obturador");
		checkBoxObt.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxObt.isSelected())
					espectrografo.activarObturador(true);
				else
					espectrografo.activarObturador(false);
			}
		});
		checkBoxObt.setBounds(85, 44, 86, 23);
		panel_2.add(checkBoxObt);
		
		checkBoxCont = new JCheckBox("Continuo");
		checkBoxCont.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(checkBoxCont.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_LAMPTUNG, true);				
				else
					interprete.accionEspectrografo(Accion.ESPEC_LAMPTUNG, false);
			}
		});
		checkBoxCont.setBounds(85, 70, 73, 23);
		panel_2.add(checkBoxCont);
		
		chckbxComparar = new JCheckBox("Comparar");
		chckbxComparar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxComparar.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_LAMPHNA, true);
				else
					interprete.accionEspectrografo(Accion.ESPEC_LAMPHNA, false);
			}
		});
		chckbxComparar.setBounds(85, 96, 73, 23);
		panel_2.add(chckbxComparar);
		
		chckbxLed = new JCheckBox("Led");
		chckbxLed.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxLed.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_LAMPLED, true);
				else
					interprete.accionEspectrografo(Accion.ESPEC_LAMPLED, false);
			}
		});
		chckbxLed.setBounds(85, 122, 73, 23);
		panel_2.add(chckbxLed);
		
		chckbxRedmas = new JCheckBox("Red+");
		chckbxRedmas.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxRedmas.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_RED, Direccion.ARRIBA);
				else
					interprete.accionEspectrografo(Accion.ESPEC_RED, Direccion.PARADO);
				
			}
		});
		chckbxRedmas.setBounds(187, 18, 73, 23);
		panel_2.add(chckbxRedmas);
		
		chckbxRedmenos = new JCheckBox("Red-");
		chckbxRedmenos.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxRedmenos.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_RED, Direccion.ABAJO);
				else
					interprete.accionEspectrografo(Accion.ESPEC_RED, Direccion.PARADO);
			}
		});
		chckbxRedmenos.setBounds(187, 44, 73, 23);
		panel_2.add(chckbxRedmenos);
		
		chckbxFiltro = new JCheckBox("Filtro02");
		chckbxFiltro.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxFiltro.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_B0, true);
				else
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_B0, false);
			}
		});
		chckbxFiltro.setBounds(187, 70, 73, 23);
		panel_2.add(chckbxFiltro);
		
		chckbxFiltro_1 = new JCheckBox("Filtro12");
		chckbxFiltro_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxFiltro_1.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_B1, true);
				else
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_B1, false);
			}
		});
		chckbxFiltro_1.setBounds(187, 96, 73, 23);
		panel_2.add(chckbxFiltro_1);
		
		chckbxEnterF = new JCheckBox("Enter F");
		chckbxEnterF.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if(chckbxEnterF.isSelected())
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_ENTER, true);
				else
					interprete.accionEspectrografo(Accion.ESPEC_FILTRO_ENTER, false);
			}
		});
		chckbxEnterF.setBounds(187, 122, 73, 23);
		panel_2.add(chckbxEnterF);
	}
	public Lecturas getLecturas()
	{
		return lecturas;
	}

	public void setLecturas(Lecturas lecturas)
	{
		this.lecturas = lecturas;
	}

	public void setTextFieldEncAlfaCenGrad(JTextField textFieldEncAlfaCenGrad)
	{
		this.textFieldEncAlfaCenGrad = textFieldEncAlfaCenGrad;
	}

	public void setTextFieldEncAlfaDecGrad(JTextField textFieldEncAlfaDecGrad)
	{
		this.textFieldEncAlfaDecGrad = textFieldEncAlfaDecGrad;
	}

	public void setTextFieldEncAlfaDecMin(JTextField textFieldEncAlfaDecMin)
	{
		this.textFieldEncAlfaDecMin = textFieldEncAlfaDecMin;
	}

	public void setTextFieldEncAlfaDecSeg(JTextField textFieldEncAlfaDecSeg)
	{
		this.textFieldEncAlfaDecSeg = textFieldEncAlfaDecSeg;
	}

	public void setTextFieldEncDeltaCenGrad(JTextField textFieldEncDeltaCenGrad)
	{
		this.textFieldEncDeltaCenGrad = textFieldEncDeltaCenGrad;
	}

	public void setTextFieldEncDeltaDecGrad(JTextField textFieldEncDeltaDecGrad)
	{
		this.textFieldEncDeltaDecGrad = textFieldEncDeltaDecGrad;
	}

	public void setTextFieldEncDeltaDecMin(JTextField textFieldEncDeltaDecMin)
	{
		this.textFieldEncDeltaDecMin = textFieldEncDeltaDecMin;
	}

	public void setTextFieldEncDeltaDecSeg(JTextField textFieldEncDeltaDecSeg)
	{
		this.textFieldEncDeltaDecSeg = textFieldEncDeltaDecSeg;
	}

	public JTextField getTextFieldEncAlfaCenGrad() {
		return textFieldEncAlfaCenGrad;
	}
	public JTextField getTextFieldEncAlfaDecGrad() {
		return textFieldEncAlfaDecGrad;
	}
	public JTextField getTextFieldEncAlfaDecMin() {
		return textFieldEncAlfaDecMin;
	}
	public JTextField getTextFieldEncAlfaDecSeg() {
		return textFieldEncAlfaDecSeg;
	}
	
	public JTextField getTextFieldEncDeltaCenGrad() {
		return textFieldEncDeltaCenGrad;
	}
	public JTextField getTextFieldEncDeltaDecGrad() {
		return textFieldEncDeltaDecGrad;
	}
	public JTextField getTextFieldEncDeltaDecMin() {
		return textFieldEncDeltaDecMin;
	}
	public JTextField getTextFieldEncDeltaDecSeg() {
		return textFieldEncDeltaDecSeg;
	}
	
	public JTextField getTextFieldCupula() {
		return textFieldCupula;
	}

	public void setTextFieldCupula(JTextField textFieldCupula)
	{
		this.textFieldCupula = textFieldCupula;
	}
	public JCheckBox getChckbxCupula() {
		return chkboxCupula;
	}
	public JTextField getTextFieldEspecX() {
		return textFieldEspecX;
	}
	public JTextField getTextFieldEspecY() {
		return textFieldEspecY;
	}
	public JTextField getTextFieldEspecRed() {
		return textFieldEspecRed;
	}
	public JTextField getTextFieldTempExt() {
		return textFieldTempExt;
	}
	public JTextField getTextFieldTempEspejo() {
		return textFieldTempEspejo;
	}
	public JTextField getTextFieldPlatARAB() {
		return textFieldPlatARAB;
	}
	public JTextField getTextFieldPlatADAF() {
		return textFieldPlatADAF;
	}
	public JTextField getTextFieldFinesCarrera() {
		return textFieldFinesCarrera;
	}
	public JTextField getTextFieldFuncionamiento() {
		return textFieldFuncionamiento;
	}
	public JCheckBox getCheckBoxTelReloj() {
		return checkBoxTelReloj;
	}
	public JCheckBox getCheckBoxTelOeste() {
		return checkBoxTelOeste;
	}
	public JCheckBox getCheckBoxTelEste() {
		return checkBoxTelEste;
	}
	public JCheckBox getCheckBoxTelSur() {
		return checkBoxTelSur;
	}
	public JCheckBox getCheckBoxTelCalado() {
		return checkBoxTelCalado;
	}
	public JCheckBox getChckbxTelNorte() {
		return chckbxTelNorte;
	}
	
	
	public JCheckBox getChckbxIzquierda() {
		return chckbxCupIzquierda;
	}
	public JCheckBox getCheckBoxCupVel() {
		return checkBoxCupVel;
	}
	public JCheckBox getCheckBoxCupDerecha() {
		return checkBoxCupDerecha;
	}
	public JCheckBox getCheckBoxEspejAlejar() {
		return checkBoxEspejAlejar;
	}
	public JCheckBox getChckbxAcercar() {
		return checkBoxEspejAcercar;
	}
	public JCheckBox getCheckBoxPlatAbajo() {
		return checkBoxPlatAbajo;
	}
	public JCheckBox getCheckBoxPlatArriba() {
		return checkBoxPlatArriba;
	}
	public JCheckBox getChckbxPlatAleja() {
		return chckbxPlatAfuera;
	}
	public JCheckBox getChckbxPlatAcerca() {
		return chckbxPlatAdentro;
	}
	public JCheckBox getCheckBoxConInterfaz0() {
		return checkBoxConInterfaz0;
	}
	public JCheckBox getCheckBoxConTablero() {
		return checkBoxConTablero;
	}
	public JCheckBox getCheckBoxConPulsador() {
		return checkBoxConPulsador;
	}
	public JCheckBox getChckbxInterfaz1() {
		return chckbxInterfaz1;
	}
	public JCheckBox getCheckBoxConReloj() {
		return checkBoxConReloj;
	}
	
	public JCheckBox getCheckBoxTelConRampa() {
		return checkBoxTelConRampa;
	}
	public JTextField getTextFieldPlatARABRes() {
		return textFieldPlatARABRes;
	}
	public JTextField getTextFieldTempExtRes() {
		return textFieldTempExtRes;
	}
	public JTextField getTextFieldEspecRedRes() {
		return textFieldEspecRedRes;
	}
	public JTextField getTextFieldEspecYRes() {
		return textFieldEspecYRes;
	}
	public JTextField getTextFieldEspecXRes() {
		return textFieldEspecXRes;
	}
	public JTextField getTextFieldPlatADAFRes() {
		return textFieldPlatADAFRes;
	}
	public JTextField getTextFieldTempEspRes() {
		return textFieldTempEspRes;
	}
	public JTextField getTextFieldCupRes() {
		return textFieldCupRes;
	}
	public JTextField getTextFieldFacCorrPlatAlt() {
		return textFieldFacCorrPlatAlt;
	}
	public JTextField getTextFieldFacTempAlim1() {
		return textFieldFacTempAlim1;
	}
	public JTextField getTextFieldFacCorrTempEsp() {
		return textFieldFacCorrTempEsp;
	}
	public JTextField getTextFieldMaxRampa() {
		return textFieldMaxRampa;
	}
	public JTextField getTextFieldMinRampa() {
		return textFieldMinRampa;
	}
	public JTextField getTextFieldFacPlaRad1() {
		return textFieldFacPlaRad1;
	}
	public JTextField getTextFieldfacEspOffsetY() {
		return textFieldfacEspOffsetY;
	}
	public JTextField getTextFieldFacCorrTempExt() {
		return textFieldFacCorrTempExt;
	}
	public JTextField getTextFieldFacEspGanX() {
		return textFieldFacEspGanX;
	}
	public JTextField getTextFieldEspFacCorrX() {
		return textFieldEspFacCorrX;
	}
	public JTextField getTextFieldFacCup0() {
		return textFieldFacCup0;
	}
	public JTextField getTextFieldfacEspGanY() {
		return textFieldfacEspGanY;
	}
	public JTextField getTextFieldFacCorrPlaRad() {
		return textFieldFacCorrPlaRad;
	}
	public JTextField getTextFieldFacPlaRad0() {
		return textFieldFacPlaRad0;
	}
	public JTextField getTextFieldFacCup1() {
		return textFieldFacCup1;
	}
	public JTextField getTextFieldfac5vDelPic() {
		return textFieldfac5vDelPic;
	}
	public JTextField getTextFieldFacTempAlim2() {
		return textFieldFacTempAlim2;
	}
	public JTextField getTextFieldFacCorrCup() {
		return textFieldFacCorrCup;
	}
	public JTextField getTextFieldfacEspOffsetX() {
		return textFieldfacEspOffsetX;
	}
	public JTextField getTextFieldFacPlaAR1() {
		return textFieldFacPlaAR1;
	}
	public JTextField getTextFieldEspFacCorrFi() {
		return textFieldEspFacCorrFi;
	}
	public JTextField getTextFieldFacEspGanFi() {
		return textFieldFacEspGanFi;
	}
	public JTextField getTextFieldFacPlaAD0() {
		return textFieldFacPlaAD0;
	}
	public JTextField getTextFieldFacPlaAD1() {
		return textFieldFacPlaAD1;
	}
	public JTextField getTextFieldFacCupGan() {
		return textFieldFacCupGan;
	}
	public JTextField getTextFieldFacCupOffset() {
		return textFieldFacCupOffset;
	}
	public JTextField getTextFieldfacEspOffsetFi() {
		return textFieldfacEspOffsetFi;
	}
	public JTextField getTextFieldDelayRampa() {
		return textFieldDelayRampa;
	}
	public JTextField getTextFieldEspFacCorrY() {
		return textFieldEspFacCorrY;
	}
	public JTextField getTextFieldFacPlaAR0() {
		return textFieldFacPlaAR0;
	}
	public JTextField getTextFieldSegDelta() {
		return textFieldSegDelta;
	}
	public JTextField getTextFieldGradDelta() {
		return textFieldGradDelta;
	}
	public JTextField getTextFieldGradAlfa() {
		return textFieldGradAlfa;
	}
	public JTextField getTextFieldMinAlfa() {
		return textFieldMinAlfa;
	}
	public JTextField getTextFieldMinDelta() {
		return textFieldMinDelta;
	}
	public JTextField getTextFieldSegAlfa() {
		return textFieldSegAlfa;
	}

	public void setTextFieldGradAlfa(JTextField textFieldGradAlfa) {
		this.textFieldGradAlfa = textFieldGradAlfa;
	}

	public void setTextFieldMinAlfa(JTextField textFieldMinAlfa) {
		this.textFieldMinAlfa = textFieldMinAlfa;
	}

	public void setTextFieldSegAlfa(JTextField textFieldSegAlfa) {
		this.textFieldSegAlfa = textFieldSegAlfa;
	}

	public void setTextFieldGradDelta(JTextField textFieldGradDelta) {
		this.textFieldGradDelta = textFieldGradDelta;
	}

	public void setTextFieldMinDelta(JTextField textFieldMinDelta) {
		this.textFieldMinDelta = textFieldMinDelta;
	}

	public void setTextFieldSegDelta(JTextField textFieldSegDelta) {
		this.textFieldSegDelta = textFieldSegDelta;
	}

	public void setTextFieldCupRes(JTextField textFieldCupRes) {
		this.textFieldCupRes = textFieldCupRes;
	}
	
	private void getFreeMem()
	{
		Runtime runtime = Runtime.getRuntime();

	    NumberFormat format = NumberFormat.getInstance();

	    StringBuilder sb = new StringBuilder();
	    long maxMemory = runtime.maxMemory();
	    long allocatedMemory = runtime.totalMemory();
	    long freeMemory = runtime.freeMemory();

	    sb.append("free memory: " + format.format(freeMemory / 1024 / 1024) + "\n");
	    sb.append("allocated memory: " + format.format(allocatedMemory / 1024 / 1024) + "\n");
	    sb.append("max memory: " + format.format(maxMemory / 1024 / 1024) + "\n");
	    sb.append("total free memory: " + format.format((freeMemory + (maxMemory - allocatedMemory)) / 1024 / 1024) + "\n");
	    
	    System.out.println(sb);
	}
	public JCheckBox getCheckBoxObt() {
		return checkBoxObt;
	}
	public JCheckBox getCheckBoxYmenos() {
		return checkBoxYmenos;
	}
	public JCheckBox getChckbxFiltro() {
		return chckbxFiltro;
	}
	public JCheckBox getChckbxRedmenos() {
		return chckbxRedmenos;
	}
	public JCheckBox getChckbxXmas() {
		return chckbxXmas;
	}
	public JCheckBox getChckbxFiltro_1() {
		return chckbxFiltro_1;
	}
	public JCheckBox getCheckBoxXmenos() {
		return checkBoxXmenos;
	}
	public JCheckBox getCheckBoxYmas() {
		return checkBoxYmas;
	}
	public JCheckBox getCheckBoxRanura() {
		return checkBoxRanura;
	}
	public JCheckBox getChckbxLed() {
		return chckbxLed;
	}
	public JCheckBox getChckbxComparar() {
		return chckbxComparar;
	}
	public JCheckBox getCheckBoxCont() {
		return checkBoxCont;
	}
	public JCheckBox getChckbxEnterF() {
		return chckbxEnterF;
	}
	public JCheckBox getChckbxRedmas() {
		return chckbxRedmas;
	}
}
